package com.vogue.supplymall.order.domain.dao.impl;

import com.vogue.supplymall.order.domain.dao.OrderCancelDao;
import com.vogue.supplymall.order.domain.mapper.OrderCancelMapper;
import com.vogue.supplymall.order.domain.model.OrderCancel;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * The type Order cancel dao.
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-03-12
 */
@Repository("orderCancelDao")
public class OrderCancelDaoImpl extends BaseDaoImpl<OrderCancel, Long> implements OrderCancelDao {
    /**
     * The Order cancel mapper.
     */
    @Resource
    OrderCancelMapper orderCancelMapper;

    @Override
    public List<OrderCancel> getOrderCancel(Long orderId) {
    	Map<String, Object> map = new HashMap<>();
    	map.put("orderId", orderId);
    	return this.selectByWhr0("orderid = #{orderId} order by createdate desc", map);
//        return orderCancelMapper.getOrderCancel(orderId);
    }
}
